package com.dailyblue.project.smbms.alibaba.user.util;

import org.springframework.stereotype.Component;

import java.util.Date;
@Component
public class DateUtil {

    public int getAge(String date){
        Date now = new Date();
        int year = Integer.parseInt(date.substring(0,4));
        return now.getYear()-year + 1900;
    }
}
